<?php $msgs = Yii::app()->user->getFlash('msgs'); ?>
         <!-- START OF MAINCOL -->
          <div class="MainCol AM_BookPage">

              <h1 class="left">评论管理</h1>

              <br class="clear" />
              
              <span class="NormalFont SmallFont">
                  <a href="<?php echo Yii::app()->baseUrl; ?>" title="home"><?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?></a> > 评论管理 > 评论管理列表
               </span><br /><br />
              
              <div class="Titlebox box"><!-- DON'T DELETE --></div>
              
              <?php if(isset($msgs['save'])) : ?>
              <div class="SuccessfulBox Smallbox">
                <span class="Successful"> <?php echo $msgs['save']; ?> </span>
              </div>
              <?php endif; ?>
              
              <div class="DisplayBox_top Smallbox">
              
              	  <b class="left SmallFont">共 <span class="Blue"><?php echo $count; ?></span> 条记录</b>
                  
                  <?php $this->widget('CLinkPager', array('pages' => $pages)); ?>
                  
                  <br class="clear" />
              </div>
              
              <ul class="Lists Smallbox">
              <?php foreach($comments as $k => $comment) { ?>
              	  <li <?php if($k%2 == 1) { ?>class="ThinGrey_bg"<?php } ?>>

                      <span class="ContentBox">
                          <p class="Smallbox">
	                          	<b><?php echo $comment->author(); ?></b>
                          </p>
                          
                          <p class="Smallbox">
                          <label>评论文章</label>: <?php echo CHtml::link($comment->post->postTitle, array('/posts/view', 'id' => $comment->post->postId), array('class' => 'BlueLink', 'target' => '_blank')); ?><br />
                          <label>评论时间</label>: <?php echo date(Yii::app()->params->dateFormat, $comment->commentDate); ?><br />
                          <label>评论者IP</label>: <?php echo $comment->commentIp; ?><br />
                          <label>评论内容</label>: <?php echo nl2br(htmlspecialchars($comment->commentContent)); ?><br />
                          </p>
                      </span>
                      <br class="clear" />
                      
                      <span class="Rated"><?php echo CHtml::link('删除', array('/admin/comments/delete/id/'.$comment->commentId), array('confirm' => '确定要删除这条评论吗？', 'class' => 'Delete')); ?></span>
                      
                      <span class="Rated">&nbsp;</span>
                </li>
                <?php } ?>
                
              </ul>
              
              
              <div class="DisplayBox_btm">
              
              	  <b class="left SmallFont">共 <span class="Blue"><?php echo $count; ?></span> 条记录。</b>
                  
                  <?php $this->widget('CLinkPager', array('pages' => $pages)); ?>
                  
                  <br class="clear" />       
              </div>
              
        </div>
          <!-- END OF MAINCOL -->